/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-10-08
 * Time: 17:10
 */
class Singleton1{
    private static Singleton1 instance = new Singleton1();

    public static Singleton1 getInstance(){
        return instance;
    }

    private Singleton1(){

    }
}

public class demo3 {
    public static void main(String[] args) {
        Singleton1 s1 = Singleton1.getInstance();
        Singleton1 s2 = Singleton1.getInstance();
        System.out.println(s1 == s2);
    }
}
